package org.flow.basic.doubts.tjbase;

import java.util.UUID;

/**
 * @author xl-9527
 * @since 2024/9/5
 */
public class StringBuilderDemo {

    public StringBuilder builderRandomStr() {
        final StringBuilder builder = new StringBuilder();
        for (int i = 0; i < 10; i++) {
            builder.append(UUID.randomUUID().toString(), 0, 4);
        }
        return builder;
    }

    public void deleteChar(StringBuilder builder, int start, int end) {
        builder.delete(start, end);
    }

    public String subStringDemo(String target, int sub) {
        return target.substring(sub);
    }
}
